<!--
 * @Author: zhangmengqiong
 * @Date: 2021-05-12 14:18:00
 * @LastEditors: zhangmengqiong
 * @LastEditTime: 2021-05-12 15:21:18
-->
<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script
      type="text/javascript"
      src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=DVPI4kwxgMqXDrTx483rHkB7c3KDRyPp"
    ></script>
    <title>百度地图3D</title>
    <style type="text/css">
      html {
        width: 100%;
        height: 100%;
      }
      body {
        width: 100%;
        height: 100%;
        margin: 0px;
        padding: 0px;
      }
      #container {
        width: 100%;
        height: 100%;
      }
    </style>
  </head>

  <body>
    <div id="container"></div>
    <script type="text/javascript">
      console.log(window.BMapGL, 'BMapGL');
      var map = new BMapGL.Map('container');
      // 创建地图实例
      var point = new BMapGL.Point(118.5, 27.5);
      // 创建点坐标
      map.centerAndZoom(point, 8);
      // 通过滚轮进行放大缩小
      map.enableScrollWheelZoom(true);
      // 初始化地图，设置中心点坐标和地图级别
      // map.setHeading(64.5);
      // map.setTilt(73);
      map.setHeading(60);
      map.setTilt(0);
      // 设置3D地图
      map.setMapType(BMAP_EARTH_MAP);
    </script>
  </body>
</html>
